package top.dbpanda.cmsjpa.learn.thread.juc;

import java.util.concurrent.ConcurrentHashMap;

/**
 * @author 20018954
 */
public class TestConcurrentHashMap {
    public static void main(String[] args) {
        ConcurrentHashMap<Object, Object> concurrentHashMap = new ConcurrentHashMap<>(16);
        concurrentHashMap.put("key1", "val1");
        concurrentHashMap.put("key2", "val2");
        concurrentHashMap.put("key3", "val3");
        concurrentHashMap.putIfAbsent("key3", "val3");
        concurrentHashMap.putIfAbsent("key4", "val4");
        System.out.println(concurrentHashMap);

    }
}
